//2009/08/15 02:57:48
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class DivisorDigits
{
public:
    int howMany(int number)
    {
		int res = 0;
		int num = number;
		while(num != 0)
		{
			int a = num % 10;
			if(a!=0 && number%a == 0) res ++;
			num /= 10;
		}
		return res;
    }
};
